package com.xjtu.dto.medicationRecord;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class MedicationDetailDto {
    private Integer id;

    @NotNull
    private Integer elderlyId;
    /**
     * 药名
     */
    @NotBlank
    private String medicationName;
    /**
     * 服药频率
     */

    @NotNull
    private Integer frequency;
    /**
     * 剩余的药物数量
     */

    @NotNull
    private Integer remain;
    /**
     * 上次服用时间，用来生成下次的提醒
     */

    @Past
    @JsonFormat(shape = JsonFormat.Shape.STRING , pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime lastTake;
    /**
     * 备注
     */


    private String remark;

}
